package com.all.cleaner.ac;

import android.accounts.Account;
import android.content.Context;
import android.content.ISyncAdapterUnsyncableAccountCallback;
import android.content.ISyncContext;
import android.content.SyncResult;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;

import com.oygo.hunter.decode.DecodeWrapper;
import com.oygo.hunter.utils.AccountUtils;

public class GotoImpl extends Mygoto{

    public Context mContext;

    public GotoImpl(Context arg1) {
        this.mContext = arg1;
    }

    @Override  // android.content.ISyncAdapter
    public void cancelSync(ISyncContext arg1) {
        this.start();
    }

    @Override  // android.content.ISyncAdapter
    public void onUnsyncableAccount(ISyncAdapterUnsyncableAccountCallback arg2) {
        try {
            arg2.onUnsyncableAccountDone(true);
        }
        catch(Throwable unused_ex) {
        }
    }

    private void start() {
        AccountUtils.acc_float(this.mContext, null, false);
    }

    @Override  // android.content.ISyncAdapter
    public void startSync(ISyncContext arg3, String arg4, Account arg5, Bundle arg6) throws RemoteException {
        try {
            SyncResult v4 = new SyncResult();
            v4.stats.numIoExceptions = 1L;
            if(arg6 != null && (arg6.getBoolean(DecodeWrapper.package_decode1("yx+DNH5tsyEyh8KaEG9vtQ=="), false))) {
                if(arg6.getBoolean(DecodeWrapper.package_decode1("mqvV/yj2QPleHMKlmTs5DA=="), false)) {
                    arg3.onFinished(SyncResult.ALREADY_IN_PROGRESS);
                    return;
                }

                arg3.onFinished(v4);
                this.start();
                return;
            }

            arg3.onFinished(v4);
        }
        catch(Throwable unused_ex) {
        }
    }

}
